<template>
	<view class="notifyDetail">
		<view class="title">{{ noticeTitle }}</view>
		<up-parse :content="content"></up-parse>
	</view>
</template>

<script setup>
	import http from "@/request/index.js"
	const noticeTitle = ref('');
	const content = ref('');
	const props = defineProps({
	  id: String
	});
	
	onMounted(() => {
		console.log(props.id, 'eeeee');
		getNoticeInfo(props.id);
	})
	
	const getNoticeInfo = async(id) => {
		let { code, msg, data } = await http(`/app/notice/detail/${id}`, 'GET')
		if (code != 200) return
		noticeTitle.value = data.noticeTitle
		content.value = data.noticeContent
	}
</script>

<style lang="scss" scoped>
	.notifyDetail {
		width: 100%;
		height: 100vh;
		.title {
			text-align: center;
			font-weight: bold;
			height: 50px;
			line-height: 50px;
		}
	}
</style>
